package com.example.cash.craft.dao.persist.repository;

import com.example.cash.craft.pojo.entity.Product;
import com.example.cash.craft.pojo.vo.PageData;
import com.example.cash.craft.pojo.vo.ProductVO;

public interface IProductRepository {

    int insert(Product product);

    int deleteById(Long id);

    int updateById(Product product);

    int countByCategoryId(Long categoryId);

    ProductVO selectById(Long id);

    PageData<ProductVO> listAll(Integer page, Integer pageSize);

    PageData<ProductVO> listByCategoryId(Long categoryId, Integer page, Integer pageSize);

}
